using Engine;

namespace Game
{
	public class LJGamesWidget : GamesWidget
	{
		public override void MeasureOverride(Vector2 parentAvailableSize)
		{
			base.MeasureOverride(parentAvailableSize);
			base.IsOverdrawRequired = false;
		}

		public override void ArrangeOverride()
		{
			if (Children.Count == 1)
			{
				ContainerWidget.ArrangeChildWidgetInCell(Vector2.Zero, base.ActualSize, Children[0]);
				Children[0].LayoutTransform = Matrix.Identity;
			}
			else if (Children.Count > 1)
			{
				ContainerWidget.ArrangeChildWidgetInCell(Vector2.Zero, base.ActualSize, Children[0]);
				Children[0].LayoutTransform = Matrix.Identity;
				for (int i = 1; i < Children.Count; i++)
				{
					Children[i].IsVisible = false;
					ContainerWidget.ArrangeChildWidgetInCell(Vector2.Zero, base.ActualSize, Children[i]);
					Children[i].LayoutTransform = Matrix.Identity;
				}
			}
		}

		public virtual void Overdraw()
		{
		}
	}
}
